﻿using System;
using System.Collections.Generic;
using System.Linq;
using ExpenseSystem.Common;
using ExpenseSystem.Fether;
using ExpenseSystem.Model;
using ExpenseSystem.Lor;

namespace ExpenseSystem.Fether
{
    public class SuiteDetailFetcher : NormalFetcher<SuiteDetailModel>, IDetailFetcher<SuiteDetailModel>
    {
        public IList<SuiteDetailModel> ListByMainId(long site, long mainId, out string message, out int rows)
        {
            IList<SuiteDetailModel> result = List( site, OrderBy.GetDefault(), Limit.GetDefault(), out message, out  rows, Restrain.Eq("SuiteId", mainId).And(Restrain.Eq("Avaliable", true)));
            return result;
        }
    }
}